package com.hwadee.ems.domain.po;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.Builder;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import com.hwadee.ems.enums.ApprovalType;
import com.hwadee.ems.enums.ApprovalStatus;

/**
 * <p>
 * 审批
 * </p>
 *
 * @author EnosElinsa
 * @since 2024/06/21
 */
@Data
@Builder
public class Approval implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 审批编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 审批人编号 references user(id)
     */
    private Long approverId;

    /**
     * 审批类型，0代表考核方式申请审批，1代表系部试卷提交申请审批，2代表教室借用申请审批，3代表调课申请审批
     */
    private ApprovalType type;

    /**
     * 审批意见
     */
    private String opinion;

    /**
     * 审批日期
     */
    private LocalDate approvalDate;

    /**
     * 审批状态，0代表批准，1代表驳回，2代表未审批
     */
    private ApprovalStatus status;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除标识
     */
    @TableLogic
    private Boolean isDeleted;

}
